$(document).ready(function(){
	//changeVertification
	$('#changeVertification').click(function(){
		$('#vertification').attr('src','common/verification.class.php?id='+Math.random());
		return false;
	})
	
	//REPORT
	$('.report_delete').click(function(){ //delete
		var index = $('.report_delete').index(this);
		var userid = $('.userid').eq(index).text();
		$.post('ajax/ajax.php',{'delete_userid':userid},function(data){
			if(data = 'success'){
				$('.report_pic_board').eq(index).fadeOut(400);
				setTimeout(function(){$('.report_pic_board').eq(index).remove();},500);
			}else if(data = 'failure'){
				
			}
		});
		setTimeout(function(){check_report_count();},600);
		return false;
	})
	
	$('.report_ignore').click(function(){  //ignore
		var index = $('.report_ignore').index(this);
		var userid = $('.userid').eq(index).text();
		$.post('ajax/ajax.php',{'ignore_userid':userid},function(data){
			if(data = 'success'){
				$('.report_pic_board').eq(index).fadeOut(400);
				setTimeout(function(){$('.report_pic_board').eq(index).remove();},500);
			}else if(data = 'failure'){
				
			}
		});
		setTimeout(function(){check_report_count();},600);
		return false;
	})
	
	function check_report_count(){
		if($('.report_pic_board').length == 0){
			$('#main').addClass('h300 tc c6');
			$('#main').html('<p class="f24 mt100">目前没有任何报告</p>');
		}
	}
	
	
	
})